#ifndef BACKGROUND_H
#define BACKGROUND_H

#include <QImage>
#include <QSharedPointer>
#include "superelement.h"

class Background : public SuperElement
{

public:
    Background();
    Background(int x, int y, int w, int h, QImage icon, int index);

    static QSharedPointer<Background> createBackground(int index);

    void showElement();
    void move();
    void destroy();
    void allowPass();


    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget);

    QImage icon() const;
    void setIcon(const QImage &icon);

    int index() const;
    void setIndex(int index);

private:
    QImage m_icon;
    int m_index;
};

#endif // BACKGROUND_H
